package jtk.project4.fleet.field;

import java.awt.FlowLayout;

import nl.coderight.jazz.form.FormLayout;
import nl.coderight.jazz.form.control.GroupControl;
import nl.coderight.jazz.form.field.TableField;
import nl.coderight.jazz.form.field.table.TableFieldColumn;
//import jtk.project4.fleet.domain.CostStatistic;


public class LaborDetailsField extends GroupControl{//<CostStatistic>{
	private TableField field1;
	private TableFieldColumn technicianCode;
	//private TableFieldColumn name;
	private TableFieldColumn totalCost;
	private TableFieldColumn percentOfTotal;
	//private TableFieldColumn description;
	
	
	public LaborDetailsField(String bindID){
		setBindID(bindID);
		createFields();
		createLayout();
		
	}
	
	
	private void createLayout() {
		// TODO Auto-generated method stub
		setLayout(new FormLayout ())
		//.addField(photofield1)
		//.addRow()
		//.addRow()
		.addField(field1);
	}


	private void createFields(){
		field1 = new TableField("","");
		
		technicianCode = new TableFieldColumn ("Technician", "");
		
		//name = new TableFieldColumn ("Name", "");
		
		totalCost = new TableFieldColumn ("Total Cost", "");
		
		percentOfTotal = new TableFieldColumn ("% of Total", "");
		
		field1.addColumn(technicianCode);

		//field1.addColumn(name);

		field1.addColumn(totalCost);

		field1.addColumn(percentOfTotal);
	
	}
	
	/*private GroupControl createTableFieldColumn() {
		GroupControl TableFieldColumn = new GroupControl();
		.setLayout(new FlowLayout(FlowLayout.LEFT));
		.focusField(identification);
		return TableFieldColumn;
	}*/
	private GroupControl createTableFieldColumn() {
		GroupControl tableFieldColumn = new GroupControl();
		tableFieldColumn.setLayout(new FlowLayout(FlowLayout.CENTER));
		tableFieldColumn.focusField(field1);
		return tableFieldColumn;
	}
}
